---
sidebar_position: 0
---

# String output parser

The `StringOutputParser` takes language model output (either an entire response or as a stream) and converts
it into a string. This is useful for standardizing chat model and LLM output.

This output parser can act as a transform stream and work with streamed response chunks from a model.

## Usage

import CodeBlock from "@theme/CodeBlock";
import StringExample from "@examples/prompts/string_output_parser.ts";

import IntegrationInstallTooltip from "@mdx_components/integration_install_tooltip.mdx";

<IntegrationInstallTooltip></IntegrationInstallTooltip>

```bash npm2yarn
npm install @langchain/openai
```

<CodeBlock language="typescript">{StringExample}</CodeBlock>
